package com.jy.rhin.infra.cda.dao.impl;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.jy.rhin.infra.cda.dao.TangNiaoBSFDao;
import com.jy.rhin.infra.cda.mapper.TangNiaoBSFMapper;
import com.jy.rhin.infra.cda.tnb.TangNiaoBSFJCVo;
import com.jy.rhin.infra.cda.tnb.TangNiaoBSFVo;
import com.jy.rhin.infra.cda.tnb.TangNiaoBSFYYVo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class TangNiaoBSFDaoImpl implements TangNiaoBSFDao {

    @Resource
    TangNiaoBSFMapper tangNiaoBSFMapper;

    @Override
    public TangNiaoBSFVo get(String tangNiaoBSFID, String yeWuJGDM) {
        QueryWrapper<TangNiaoBSFVo> queryWrapper = new QueryWrapper<TangNiaoBSFVo>();
        queryWrapper.eq("YEWUJGDM", yeWuJGDM);
        queryWrapper.eq("TANGNIAOBSFID", tangNiaoBSFID);
        return tangNiaoBSFMapper.getOne(queryWrapper);
    }

    @Override
    public List<TangNiaoBSFYYVo> getYongYao(String tangNiaoBSFID, String yeWuJGDM) {
        QueryWrapper<TangNiaoBSFYYVo> queryWrapper = new QueryWrapper<TangNiaoBSFYYVo>();
        queryWrapper.eq("YEWUJGDM", yeWuJGDM);
        queryWrapper.eq("TANGNIAOBSFID", tangNiaoBSFID);
        return tangNiaoBSFMapper.getYongYao(queryWrapper);
    }

    @Override
    public List<TangNiaoBSFJCVo> getJianCha(String tangNiaoBSFID, String yeWuJGDM) {
        QueryWrapper<TangNiaoBSFJCVo> queryWrapper = new QueryWrapper<TangNiaoBSFJCVo>();
        queryWrapper.eq("YEWUJGDM", yeWuJGDM);
        queryWrapper.eq("TANGNIAOBSFID", tangNiaoBSFID);
        return tangNiaoBSFMapper.getJianCha(queryWrapper);
    }

}
